package com.hr.service;

import com.hr.dao.PositionDAO;
import com.hr.model.Position;
import org.apache.ibatis.annotations.Param;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PositionService
{
    @Autowired
    PositionDAO positionDAO;

    public Position getPositionByPId(int pid)
    {
        return positionDAO.getPositionByPId(pid);
    }

    public List<Position> getPositionsByAId(int aid)
    {
        return positionDAO.getPositionsByAId(aid);
    }

    public void insertPosition(int aid,Position position)
    {
        positionDAO.insertPositon(aid,position);
    }

    public void updatePosition(Position position)
    {
        positionDAO.updatePositon(position);
    }
}
